/**
 * Created by Administrator on 2016/9/13.
 */
define(['jquery'],function(){
    $(function(){
        var oA= $("#lift a");
        oA.click(function(){
            oA.css({"color":"#666","background":"white"});
            var index=$(this).index();
            $(this).css({"color":"white","background":"#e5374d"});

            var start = document.body.scrollTop;
            var end = 801+649*index;
            var change = end-start;

            var timer1;
            var t = 0;
            var maxT = 30;
            var t1 = 17;
            timer1 = setInterval(function(){
                t++;
                if(t>=maxT){
                    clearInterval(timer1);
                }
                document.body.scrollTop = start+change/maxT*t;
            },t1);

        })
    });
});
